home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Dev
/
Oberon
/
source
/
OC
/
OCStrings.mod
< prev
next >
Wrap
Text File
|
1995-07-02
|
7KB
|
168 lines
<* STANDARD- *> <* MAIN- *> <* INITIALISE- *>
MODULE OCStrings;
(****************************************************************
This file was created automatically by `FlexCat 1.5'
Do NOT edit by hand!
Oberon-A source description C 1994 by Albert Weinert
Using with Oberon-A Interfaces for AmigaOS Release 3.1
Modified for Oberon-A 1.5 by Frank Copeland
Application: OCStrings
Language : "english"
Version : 4
Description: OBERON-A:Catalogs/OCStrings.cd
****************************************************************)
IMPORT
lo := Locale, e := Exec, u := Utility, y := SYSTEM;
CONST
builtinlanguage = "english";
version = 4;
CONST
OCS1* = 0;
OCS2* = 1;
OCS3* = 2;
OCS4* = 3;
OCS5* = 4;
OCS6* = 5;
OCS7* = 6;
OCS8* = 7;
OCS9* = 8;
OCS10* = 9;
OCS11* = 10;
OCS12* = 11;
OCS13* = 12;
OCT1* = 13;
OCT2* = 14;
OCT3* = 15;
OCT4* = 16;
OCT5* = 17;
Compiler1* = 18;
Compiler2* = 19;
Compiler3* = 20;
Compiler4* = 21;
OC1* = 22;
OC6* = 23;
OC7* = 24;
OC8* = 25;
OC9* = 26;
OC10* = 27;
OC11* = 28;
OC12* = 29;
OC13* = 30;
OC14* = 31;
OC15* = 32;
OC16* = 33;
OC17* = 34;
OC18* = 35;
OC19* = 36;
OC20* = 37;
OCC1* = 38;
TYPE
AppString = RECORD;
id : LONGINT;
str : e.LSTRPTR;
END;
AppStringArray = ARRAY 39 OF AppString;
VAR
AppStrings : AppStringArray;
catalog : lo.CatalogPtr;
PROCEDURE SetStrings;
BEGIN
AppStrings[0].id := OCS1; AppStrings[0].str := y.ADR( " line %ld, col %ld: err = %ld\n" );
AppStrings[1].id := OCS2; AppStrings[1].str := y.ADR( " !! Error #%ld, line = %ld, col = %ld\n" );
AppStrings[2].id := OCS3; AppStrings[2].str := y.ADR( " !! Warning #%ld, line = %ld, col = %ld\n" );
AppStrings[3].id := OCS4; AppStrings[3].str := y.ADR( "Mark: line %ld, col %ld: err = %ld\n" );
AppStrings[4].id := OCS5; AppStrings[4].str := y.ADR( "Warning: line %ld, col %ld: err = %ld\n" );
AppStrings[5].id := OCS6; AppStrings[5].str := y.ADR( " !! SET '%s' is not allowed\n" );
AppStrings[6].id := OCS7; AppStrings[6].str := y.ADR( " !! CLEAR '%s' is not allowed\n" );
AppStrings[7].id := OCS8; AppStrings[7].str := y.ADR( " !! Could not open error file '%s'\n" );
AppStrings[8].id := OCS9; AppStrings[8].str := y.ADR( "%s : compilation error listing\n" );
AppStrings[9].id := OCS10; AppStrings[9].str := y.ADR( "Module: %s\n" );
AppStrings[10].id := OCS11; AppStrings[10].str := y.ADR( " !! Errors detected\n >> Error file : %s\n" );
AppStrings[11].id := OCS12; AppStrings[11].str := y.ADR( " !! Warnings detected\n >> Warning file : %s\n" );
AppStrings[12].id := OCS13; AppStrings[12].str := y.ADR( " !! Invalid keyword table\n" );
AppStrings[13].id := OCT1; AppStrings[13].str := y.ADR( " !! Could not find '%s'\n" );
AppStrings[14].id := OCT2; AppStrings[14].str := y.ADR( " !! Error in '%s'\n" );
AppStrings[15].id := OCT3; AppStrings[15].str := y.ADR( " !! Could not open '%s'\n" );
AppStrings[16].id := OCT4; AppStrings[16].str := y.ADR( " !! Symbol file '%s' is obsolete\n" );
AppStrings[17].id := OCT5; AppStrings[17].str := y.ADR( " >> New symbol file : %s\n" );
AppStrings[18].id := Compiler1; AppStrings[18].str := y.ADR( " !! Err #16: MODULE keyword not found\n" );
AppStrings[19].id := Compiler2; AppStrings[19].str := y.ADR( " >> Object file : %s\n" );
AppStrings[20].id := Compiler3; AppStrings[20].str := y.ADR( " CODE: %ld, DATA: %ld, VARS: %ld, TOTAL: %ld\n" );
AppStrings[21].id := Compiler4; AppStrings[21].str := y.ADR( " !! Err #10: identifier expected after MODULE\n" );
AppStrings[22].id := OC1; AppStrings[22].str := y.ADR( " !! Could not open preferences file '%s'\n" );
AppStrings[23].id := OC6; AppStrings[23].str := y.ADR( "Could not open : %s\n" );
AppStrings[24].id := OC7; AppStrings[24].str := y.ADR( "Compiling %s...\n" );
AppStrings[25].id := OC8; AppStrings[25].str := y.ADR( "Garbage collecting..." );
AppStrings[26].id := OC9; AppStrings[26].str := y.ADR( "Source file ? : " );
AppStrings[27].id := OC10; AppStrings[27].str := y.ADR( "Finished batch compile\n" );
AppStrings[28].id := OC11; AppStrings[28].str := y.ADR( " !! Could not open '%s'\n" );
AppStrings[29].id := OC12; AppStrings[29].str := y.ADR( " !! OC requires AmigaOS 2.04 or greater\n" );
AppStrings[30].id := OC13; AppStrings[30].str := y.ADR( "See OC.doc for conditions of use\n" );
AppStrings[31].id := OC14; AppStrings[31].str := y.ADR( " !! Arguments VERBOSE and QUIET are mutually exclusive\n" );
AppStrings[32].id := OC15; AppStrings[32].str := y.ADR( " !! Arguments DEBUG and NODEBUG are mutually exclusive\n" );
AppStrings[33].id := OC16; AppStrings[33].str := y.ADR( " !! Arguments MAKEICONS and NOICONS are mutually exclusive\n" );
AppStrings[34].id := OC17; AppStrings[34].str := y.ADR( " !! Arguments SMALLCODE and LARGECODE are mutually exclusive\n" );
AppStrings[35].id := OC18; AppStrings[35].str := y.ADR( " !! Arguments SMALLDATA and LARGEDATA are mutually exclusive\n" );
AppStrings[36].id := OC19; AppStrings[36].str := y.ADR( " !! Arguments REGISTER and NOREGISTER are mutually exclusive\n" );
AppStrings[37].id := OC20; AppStrings[37].str := y.ADR( "Copyright © 1993-95 Frank Copeland" );
AppStrings[38].id := OCC1; AppStrings[38].str := y.ADR( " !! Could not allocate code and/or constant buffers\n" );
END SetStrings;
PROCEDURE CloseCatalog*();
BEGIN
IF catalog # NIL THEN lo.CloseCatalog (catalog); catalog:=NIL END;
END CloseCatalog;
PROCEDURE OpenCatalog*(loc:lo.LocalePtr; language:ARRAY OF CHAR);
VAR Tag : ARRAY 4 OF u.TagItem;
BEGIN
CloseCatalog();
IF (catalog = NIL) & (lo.base # NIL) THEN
Tag[0].tag := lo.builtInLanguage; Tag[0].data := y.ADR( builtinlanguage );
Tag[1].tag := u.ignore; Tag[1].data := y.ADR( language );
Tag[2].tag := lo.version; Tag[2].data := version;
Tag[3].tag := u.done;
IF language # "" THEN
Tag[1].tag:= lo.language;
END;
catalog := lo.OpenCatalogA (loc, "OCStrings.catalog", Tag);
END;
END OpenCatalog;
PROCEDURE GetString* (num: LONGINT): e.LSTRPTR;
VAR
i: LONGINT;
default: e.LSTRPTR;
BEGIN
i := 0; WHILE (i < 39) & (AppStrings[i].id # num) DO INC (i) END;
IF i # 39 THEN
default := AppStrings[i].str;
ELSE
default := NIL;
END;
IF catalog # NIL THEN
RETURN lo.GetCatalogStr (catalog, num, default^);
ELSE
RETURN default;
END;
END GetString;
BEGIN
catalog := NIL;
SetStrings;
END OCStrings.